package system;

import java.util.ArrayList;

public class Player {

	Color color;
	String name;
	int points = 0;
	ArrayList<ActionPoint> houses = new ArrayList<ActionPoint>(); //actionpoints controlled by player
	ArrayList<Edge> streets = new ArrayList<Edge>(); //streets controlled by player
	
	
	public Player(Color c, String name){
		this.color = c;
		this.name = name;
		
	}
	


	public Color getColor() {
		return color;
	}


	public void setColor(Color color) {
		this.color = color;
	}


	public String getName() {
		return name;
	}


	public void setName(String name) {
		this.name = name;
	}


	public int getPoints() {
		return points;
	}


	public void setPoints(int points) {
		this.points = points;
	}


	public ArrayList<ActionPoint> getActionPoints() {
		return houses;
	}


	public void addHouse(ActionPoint house) {
		houses.add(house);
	}
	
	public void addStreet(Edge e){
		streets.add(e);
	}
	
	@Override
	public String toString(){
		return name;
	}
	
	@Override
	public boolean equals(Object o){
		if ( !(o instanceof Player))
			return false;
			else
			{
				return ((Player)o).name.equals(name);
			}
	}
	
	
}
